package com.jt.controller;

import com.jt.pojo.User;
import com.jt.pojo.User2;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloController3 {
    @ResponseBody
    @RequestMapping("/hello")
    public String hello(){
        return "你好";
    }
    @GetMapping("/getUser")
    @ResponseBody
    public User2 getUser(){
        User2 user2 = new User2();
        user2.setId(100);
        user2.setName("HH");
        return user2;
    }

}
